import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/member/list',
    method: 'post',
    data: query
  })
}

export function downloadList(query) {
  return request({
    url: '/member/downloadList',
    method: 'post',
    data: query
  })
}

export function fetchCryList(query) {
  return request({
    url: '/member/listcries',
    method: 'post',
    data: query
  })
}

export function downloadCryList(query) {
  return request({
    url: '/member/downloadCryList',
    method: 'post',
    data: query
  })
}

export function doDownloadCryList(query) {
  return request({
    url: '/member/doDownloadCryList',
    method: 'post',
    data: query,
    responseType: 'blob',
    timeout: 120000
  })
}

export function setAsFirstCryRecord(query) {
  return request({
    url: '/member/setAsFirstCryRecord',
    method: 'post',
    data: query
  })
}

export function fetchFreeTrailList(query) {
  return request({
    url: '/member/listFreeTrialBabies',
    method: 'post',
    data: query
  })
}

export function listBabyFreeTrials(query) {
  return request({
    url: '/member/listBabyFreeTrials',
    method: 'post',
    data: query
  })
}

export function listCollect(query) {
  return request({
    url: '/collect/list',
    method: 'get',
    params: query
  })
}

export function listFeedback(query) {
  return request({
    url: '/feedback/list',
    method: 'get',
    params: query
  })
}

export function listFootprint(query) {
  return request({
    url: '/footprint/list',
    method: 'get',
    params: query
  })
}

export function listHistory(query) {
  return request({
    url: '/history/list',
    method: 'get',
    params: query
  })
}

export function userDetail(query) {
  return request({
    url: '/member/user',
    method: 'post',
    data: query
  })
}

//图片上传
export function uploadImg(query) {
  return request({
    url: '/auth/upload',
    method: 'post',
    data: query
  })
}
